Skip to content

perf(ci): move slow pre-push hooks to CI and split into Lint/Security workflows#720

Merged
cpcloud merged 4 commits intomainfrom
worktree-sharded-spinning-scroll
Mar 8, 2026
Merged

perf(ci): move slow pre-push hooks to CI and split into Lint/Security workflows#720
cpcloud merged 4 commits intomainfrom
worktree-sharded-spinning-scroll

Conversation

@cpcloud
Copy link
Copy Markdown
Collaborator

@cpcloud cpcloud commented Mar 8, 2026

Summary

  • Disable deadcode, golangci-lint, govulncheck, and osv-scanner from pre-push hooks (enable = false) so they no longer block git push
  • Keep go-generate-check as the sole remaining pre-push hook
  • Add run-golangci-lint nix app; the other three already existed
  • Update run-pre-commit nix app to accept optional args (defaults to --all-files, supports --from-ref/--to-ref passthrough)
  • Split CI into three focused workflows:
    • CI (ci.yml) — test matrix, benchmarks, nix build, docs, semantic release
    • Lint (lint.yml) — deadcode, golangci-lint, pre-commit (diff-only on PRs)
    • Security (security.yml) — govulncheck, osv-scanner, trufflehog, CodeQL
  • Merge codeql.yml into security.yml, simplify to build-mode: none, drop cron schedule

closes #718

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.33%. Comparing base (8f7cb55) to head (6606436).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cpcloud and others added 3 commits March 8, 2026 18:59
Disable deadcode, golangci-lint, govulncheck, and osv-scanner from
pre-push hooks (they remain defined but with enable=false) and run them
as independent CI jobs via a nix-tools matrix using cachix/install-nix-action
and nix run. go-generate-check stays in pre-push.

Also adds a run-golangci-lint nix app and updates the pre-commit CI step
to use --from-ref/--to-ref for diff-only checking instead of --all-files.

closes #718

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move lint jobs (deadcode, golangci-lint, pre-commit) into lint.yml and
security jobs (govulncheck, osv-scanner, trufflehog, CodeQL) into
security.yml. Simplify CodeQL to build-mode: none (no build step needed)
and drop its weekly cron schedule. CI workflow retains test, benchmarks,
nix build, docs, and semantic release.

closes #718

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Go's CodeQL extractor does not support build-mode: none. Restore the
manual build mode with setup-go and explicit go build step, matching the
original codeql.yml configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cpcloud cpcloud force-pushed the worktree-sharded-spinning-scroll branch from 85e34a0 to 20e43a8 Compare March 8, 2026 23:00
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out
the documentation.

Replace the nix-lint and nix-security matrix strategies with standalone
jobs. Two entries don't justify the indirection of a matrix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cpcloud cpcloud changed the title perf(ci): move slow pre-push hooks to CI-only nix-tools matrix job perf(ci): move slow pre-push hooks to CI and split into Lint/Security workflows Mar 8, 2026
@cpcloud cpcloud merged commit a3477bc into main Mar 8, 2026
20 checks passed
@cpcloud cpcloud deleted the worktree-sharded-spinning-scroll branch March 8, 2026 23:14
cpcloud added a commit that referenced this pull request Mar 19, 2026
… workflows (#720)

## Summary

- Disable `deadcode`, `golangci-lint`, `govulncheck`, and `osv-scanner`
from pre-push hooks (`enable = false`) so they no longer block `git
push`
- Keep `go-generate-check` as the sole remaining pre-push hook
- Add `run-golangci-lint` nix app; the other three already existed
- Update `run-pre-commit` nix app to accept optional args (defaults to
`--all-files`, supports `--from-ref`/`--to-ref` passthrough)
- Split CI into three focused workflows:
- **CI** (`ci.yml`) — test matrix, benchmarks, nix build, docs, semantic
release
- **Lint** (`lint.yml`) — deadcode, golangci-lint, pre-commit (diff-only
on PRs)
- **Security** (`security.yml`) — govulncheck, osv-scanner, trufflehog,
CodeQL
- Merge `codeql.yml` into `security.yml`, simplify to `build-mode:
none`, drop cron schedule

closes #718

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(dev): move slow pre-push hooks to CI-only

2 participants